
from selenium import webdriver
from selenium.webdriver.support.ui import Select
import time

file_path = 'D:/project/python100/Day54/selenium.html'
driver = webdriver.Chrome()
driver.get(file_path)
driver.maximize_window()

driver.find_element_by_css_selector('div#signup input[name="username"]').send_keys('rabbit')
driver.find_element_by_css_selector('div#signup input[name="password"]').send_keys('love')
driver.find_element_by_css_selector('div#signup input[name="multi_login"]').click()
Select(driver.find_element_by_css_selector('div#signup select[name="city"]')).select_by_value('sz')
driver.find_element_by_css_selector('div#signup input[type="submit"]').click()
time.sleep(3)
# driver.switch_to.alert.accept()

driver.close()
driver.quit()


